package com.boxin.ims.modules.jiujiudevice.taskthread;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.boxin.ims.modules.jiujiudevice.entity.JiuCashRecord;
import com.boxin.ims.modules.jiujiudevice.service.JiuCashRecordService;
import com.boxin.ims.modules.jiujiudevice.service.JiuOrderLogService;
import com.boxin.ims.modules.sys.scheduler.JiuAutomatismCancelScheduler;

/**
 * 如果用户押金不足以支付设备使用费用时
 * 自动关闭设备
 * @author dongchao
 *
 */
@Service
public class AutoCloseDeviceThread implements Runnable{

	@Autowired
	private JiuCashRecordService jiuCashRecordService;
	@Autowired
	private JiuOrderLogService jiuOrderLogService;
	
	
	
	@Override
	public void run() {
		while(true){
			
			try {
				//30分钟执行一次
				Thread.sleep(1000*60*30);
			} catch (InterruptedException e) {
				System.err.println("自动关闭设备线程被中断");
				e.printStackTrace();
			}
		}		
	}

}
